#include <57header.h>

/* Usage: ./08_readint filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1], O_RDWR);
    ERROR_CHECK(fd, -1, "open");
    
    int num;
    int ret = read(fd, &num, sizeof(num));
    ERROR_CHECK(ret, -1, "read");

    printf("num = %d\n",num);

    close(fd);
    return 0;
}

